home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / dbapg.arc / PC_DATE.PRG < prev    next >
Encoding:
Text File  |  1984-08-12  |  1.3 KB  |  36 lines

  1. * Program.: PC_DATE.PRG
  2. * Author..: Tom Rettig
  3. * Date....: 12/29/83
  4. * Notice..: Copyright 1983, Ashton-Tate, All Rights Reserved.
  5. * Version.: dBASE II, version 2.4
  6. * Notes...: Sets the IBM-PC DOS system date from the dBASE II
  7. *           system DATE().
  8. *
  9. *   OUT: is:set    True if DOS took the date.
  10. *                  False if not a valid DOS date.
  11. *
  12. * ---Parse the dBASE system date into memory variables.
  13. STORE VAL( $( DATE(), 1, 2 ) ) TO t:month
  14. STORE VAL( $( DATE(), 4, 2 ) ) TO t:day
  15. * ---The year is stored in two bytes, high order and low order.
  16. STORE INT( 1900 / 256 ) TO t:year:hi
  17. STORE VAL( $( DATE(), 7, 2 ) ) +;
  18.       1900 - INT( 1900 / 256 ) * 256 TO t:year:low
  19. *
  20. * ---Place the parsed date into memory where the
  21. * ---assembly routine can get to it.
  22. POKE 61453, t:day, t:month, t:year:low, t:year:hi
  23. *
  24. * ---Place the assembly routine into memory, and run it.
  25. POKE 61457, 139, 14, 15,240,139, 22, 13,240
  26. POKE 61465, 180, 43,205, 33,162, 33,240,195
  27. SET CALL TO 61457
  28. CALL
  29. *
  30. * ---Check to see if DOS accepted the date.
  31. STORE PEEK( 61473 ) = 0 TO is:set
  32. *
  33. RELEASE t:day, t:month, t:year:hi, t:year:low
  34. RETURN
  35. * EOF: PC_DATE.PRG
  36.